
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label  class="control-label col-xs-12 col-sm-2">appid(TextIn):</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" placeholder="请输入appid" value="{$wechat.textin_api}" class="form-control" name="row[textin_api]" type="text">
        </div>
        <div class="col-xs-12 col-sm-2">
        <small class="pull-left" style=" margin-left: -10px;line-height: 31px;"><i class="fa fa-info-circle"></i> <a href="https://www.textin.com/document/index" target="_blank">查看</a></small>
        </div>
    </div>

    <div class="form-group">
        <label  class="control-label col-xs-12 col-sm-2">secretCode(TextIn):</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" placeholder="请输入secretCode" value="{$wechat.textin_secret}" class="form-control" name="row[textin_secret]" type="text">
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-12 col-sm-8 col-sm-offset-1">
            <table class="table" style="text-align: center">
                <thead>
                <tr>
                    <td>名片字段</td>
                    <td>转化为客户字段</td>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>姓名</td>
                    <td><select name="field[name]" class="form-control selectpicker" data-live-search="true">
                        <option value="">请选择客户字段</option>
                        {foreach name="fields" item="val"}
                        <option value="{$val.field}" {if condition="$wechat.textin_field"}{eq name="$wechat.textin_field.name" value="$val.field"}selected="selected"{/eq}{/if} >{$val.name}</option>
                        {/foreach}
                    </select></td>
                </tr>
                <tr>
                    <td>手机</td>
                    <td><select name="field[telephone]"class="form-control selectpicker" data-live-search="true">
                        <option value="">请选择客户字段</option>
                        {foreach name="fields" item="val"}
                        <option value="{$val.field}" {if condition="$wechat.textin_field"}{eq name="$wechat.textin_field.telephone" value="$val.field"}selected="selected"{/eq}{/if}>{$val.name}</option>
                        {/foreach}
                    </select></td>
                </tr>
                <tr>
                    <td>电话</td>
                    <td><select name="field[work_tel]"class="form-control selectpicker" data-live-search="true">
                        <option value="">请选择客户字段</option>
                        {foreach name="fields" item="val"}
                        <option value="{$val.field}"  {if condition="$wechat.textin_field"}{eq name="$wechat.textin_field.work_tel" value="$val.field"}selected="selected"{/eq}{/if}>{$val.name}</option>
                        {/foreach}
                    </select></td>
                </tr>
                <tr>
                    <td>邮箱</td>
                    <td><select name="field[email]" class="form-control selectpicker" data-live-search="true">
                        <option value="">请选择客户字段</option>
                        {foreach name="fields" item="val"}
                        <option value="{$val.field}"  {if condition="$wechat.textin_field"}{eq name="$wechat.textin_field.email" value="$val.field"}selected="selected"{/eq}{/if}>{$val.name}</option>
                        {/foreach}
                    </select></td>
                </tr>
                <tr>
                    <td>地址</td>
                    <td><select name="field[address]"class="form-control selectpicker" data-live-search="true">
                        <option value="">请选择客户字段</option>
                        {foreach name="fields" item="val"}
                        <option value="{$val.field}" {if condition="$wechat.textin_field"} {eq name="$wechat.textin_field.address" value="$val.field"}selected="selected"{/eq}{/if}>{$val.name}</option>
                        {/foreach}
                    </select></td>
                </tr>
                <tr>
                    <td>QQ</td>
                    <td><select name="field[QQ]" class="form-control selectpicker" data-live-search="true">
                        <option value="">请选择客户字段</option>
                        {foreach name="fields" item="val"}
                        <option value="{$val.field}" {if condition="$wechat.textin_field"}{eq name="$wechat.textin_field.QQ" value="$val.field"}selected="selected"{/eq}{/if}>{$val.name}</option>
                        {/foreach}
                    </select></td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>


    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
